Add Support section with Buy Me a Coffee link#241
Merged
Conversation
Move the per-app enable/disable toggle directly under "Enable Globally" so both scope controls sit together. Rename "Show Indicator" to "Show Cotabby Indicator" and relabel the multi-line toggle to "Allow Multi-line Suggestions", moving it up beneath the indicator toggle next to the other behavior switches instead of trailing the engine/model/length pickers.
Add a Support section to the settings window directly above Updates with a link to https://buymeacoffee.com/cotabby, and restore the Buy Me a Coffee button in the README (removed in an earlier cleanup) using the new Cotabby link.
| private var supportSection: some View { | ||
| Section("Support") { | ||
| LabeledContent { | ||
| Link("Buy Me a Coffee", destination: URL(string: "https://buymeacoffee.com/cotabby")!) |
Contributor
There was a problem hiding this comment.
Force-unwrapping
URL(string:) will crash at runtime if the literal ever becomes invalid (e.g. a typo during a future edit). Since Link requires a non-optional URL, a safe alternative is to declare it as a static constant outside the view body so the crash would surface at app launch rather than silently in a live setting — or use a no-op fallback URL.
Suggested change
| Link("Buy Me a Coffee", destination: URL(string: "https://buymeacoffee.com/cotabby")!) | |
| Link("Buy Me a Coffee", destination: URL(string: "https://buymeacoffee.com/cotabby") ?? URL(string: "https://buymeacoffee.com")!) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Support section to the settings window, positioned directly above the Updates panel, with a link to https://buymeacoffee.com/cotabby. Also restores the Buy Me a Coffee button in the README (removed in an earlier cleanup) using the new Cotabby link.
Validation
Settings change is additive (a new
Linkrow); README change is a static button.Linked issues
None.
Risk / rollout notes
No behavior, settings, or schema changes — purely additive UI/docs. The Buy Me a Coffee URL points at
buymeacoffee.com/cotabby; confirm that page is live before merge.Greptile Summary
This PR adds a Support section to the settings window (above the Updates panel) with a Buy Me a Coffee link, restores the corresponding badge in the README, and takes the opportunity to clean up the menu bar toggles — reordering them, renaming two labels, and moving the multi-line toggle alongside the other feature toggles.
SettingsView.swift: newsupportSectioninserted beforeupdatesSection; uses a force-unwrappedURL(string:)literal that is safe today but fragile to future edits.MenuBarView.swift: "Include Clipboard Context" moved below the app-specific toggle; "Show Indicator" → "Show Cotabby Indicator"; "Multi-line" → "Allow Multi-line Suggestions" and relocated above the engine picker.README.md: additive Support section with a Buy Me a Coffee badge pointing tobuymeacoffee.com/cotabby.Confidence Score: 4/5
Safe to merge; all changes are additive UI and documentation with no behavior or schema impact.
The settings addition and README update are purely additive. The menu bar toggle reordering and renames are cosmetic. The only code-quality concern is the force-unwrapped URL literal in
supportSection, which is safe with the current string but would crash immediately if the literal were ever malformed during a future edit.No files require special attention beyond the force-unwrap on line 421 of
SettingsView.swift.Important Files Changed
supportSectionaboveupdatesSectionwith aLinkto buymeacoffee.com; uses a force-unwrapped URL literal which is safe today but fragile to future edits.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD SV[SettingsView body] SV --> SH[settingsHeader] SH --> SUP[supportSection NEW] SUP --> LINK["Link → buymeacoffee.com/cotabby"] SUP --> UPD[updatesSection] UPD --> UNI[uninstallSection] UNI --> GEN[generalSection ...] MB[MenuBarView controlsSection] MB --> EG[Enable Globally] EG --> APP["Enable in app (conditional)"] APP --> CC[Include Clipboard Context MOVED] CC --> SCI[Show Cotabby Indicator RENAMED] SCI --> ML[Allow Multi-line Suggestions RENAMED+MOVED] ML --> ENG[Engine Picker] ENG --> LEN[Length Picker]Reviews (1): Last reviewed commit: "Add Support section linking to Buy Me a ..." | Re-trigger Greptile